import Vue from 'vue'

// 注册全局指令 处理图片加载异常
Vue.directive('err', {
  inserted(el, binding) {
    el.onerror = function() {
      console.log('裂开了')
      this.src = binding.value
    }
  }
})
